import * as cornerstoneTools from "@cornerstonejs/tools";
import {
  CrosshairsTool,
  PanTool,
  PlanarRotateTool,
  StackScrollTool,
  WindowLevelTool,
  ZoomTool,
  LengthTool,
  AngleTool,
  RectangleROITool,
  StackScrollMouseWheelTool,
  TrackballRotateTool, SegmentationDisplayTool
} from '@cornerstonejs/tools'
import {metaData} from "@cornerstonejs/core";
import getImgInfoProvider from '@/config/getImgInfoProvider'
import generalImageModuleProvider from '@/config/generalImageModuleProvider'

const initTools = () => {
    [PanTool, ZoomTool, WindowLevelTool, PlanarRotateTool,
        StackScrollTool,StackScrollMouseWheelTool,CrosshairsTool,LengthTool,AngleTool,
        RectangleROITool,TrackballRotateTool,SegmentationDisplayTool
    ].forEach(eachTool => {
        cornerstoneTools.addTool(eachTool)
    })
}

metaData.addProvider(getImgInfoProvider.get.bind(getImgInfoProvider), 10000);
metaData.addProvider(generalImageModuleProvider.get.bind(generalImageModuleProvider), 10000);

export {
    initTools
}
